#ifndef __SUCLLPIPE_H__
#define __SCULLPIPE_H__

#undef PDEBUG
#ifdef SCULLPIPE_DEBUG
#ifdef __KERNEL__
#define PDEBUG(fmt, args...) printk(KERN_DEBUG "scullpipe: " fmt, ##args)
#else
#define PDEBUG(fmt, args...) fprintf(stderr, fmt, ##args)
#endif
#else
#define PDEBUG(fmt, args...)
#endif

#undef PDEBUGG
#define PDEBUGG(fmt, args...)

#define DEVNAME "scullpipe"
#define DEVCOUNT 1
#define BASEMINOR 0
#define SCULLPIPE_BUFFER 1024



struct scull_pipe {
	wait_queue_head_t inq, outq;
	char *buffer, *end;
	int buffersize;
	char *rp, *wp;
	int nreaders, nwriters;
	struct fasync_struct *async_queue;
	struct mutex lock;
	struct cdev cdev;
};

#endif /*__SCULLPIPE_H__*/
